import { DataSource } from "maishu-wuzhui"
import { User } from "entities"
import { WeiXinService } from "./weixin"
import { errorHandle } from "maishu-chitu-admin/static";

let wxService = new WeiXinService(err => errorHandle(err));
let userDataSource = new DataSource<User>({
    select: async (args) => {
        let r = await wxService.userList(args);
        return r;
    }
})

export let dataSources = {
    user: userDataSource
}